package cn.dmrliu.edu.publish.mapper;

import cn.dmrliu.edu.publish.bean.TrafficVisitorTypeStats;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TrafficVisitorTypeStatsMapper {


    @Select("select\n" +
            "  is_new,\n" +
            "  sum(uv_ct) uv_ct,\n" +
            "  sum(pv_ct) pv_ct,\n" +
            "  sum(sv_ct) sv_ct,\n" +
            "  sum(uj_ct) uj_ct,\n" +
            "  sum(dur_sum) dur_sum\n" +
            "from dws_traffic_vc_ch_ar_is_new_page_view_window\n" +
            "where toYYYYMMDD(stt) = #{date}\n" +
            "group by is_new;")
    List<TrafficVisitorTypeStats> selectVisitorPerType(Integer date);
}
